<?
class Vakanz_Relation_Attributes extends Vakanz_CRM_Db_Table {
	protected $_name = 'crm_relationattribute';
	protected $_primary = 'relationattribute_id';

	protected $_rowClass = 'Vakanz_Relation_Attribute';

	protected $_referenceMap = array(
		'RelationAttribute' => array(
			'columns' => 'relation_id',
			'refTableClass' => 'Vakanz_Relations',
			'refColumns' => 'relation_id'
		)
	);

	public function fetchAll($select = null) {
		if (is_null($select)) {
			$select = $this->select();
		}
		if (is_a($select,'Zend_Db_Table_Select') ) {
			$select->where('relationattribute_status = ?', 10);
		}
		return parent::fetchAll($select);
	}


}